<style tyle="text/css">
	.modal-lg {
		width: 60%;
	}
</style>
<div class="modal-header">
	<h4 class="modal-title">一卡通信息</h4>
</div>
<div class="modal-body">

	<form name="form" class="form-horizontal form-validation ng-pristine ng-valid ng-valid-required">
		<div ng-if="type == '1'">
			<div class="form-group">
				<h4 class="col-lg-4 control-label">卡类型</h4>
				<h4 class="col-sm-4">
					<ui-select ng-model="card.card_type" theme="bootstrap" ng-disabled="true">
						<ui-select-match placeholder="选择卡类型...">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices repeat="item.code as item in category_list">
							<span ng-bind-html="item.name | highlight: $select.search"></span>
						</ui-select-choices>
					</ui-select>
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">所属景区</h4>
				<h4 class="col-sm-4">
					<ui-select ng-model="card.view_code" theme="bootstrap" ng-disabled="true">
						<ui-select-match placeholder="选择所属景区...">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices repeat="item.code as item in viewList">
							<span ng-bind-html="item.name | highlight: $select.search"></span>
						</ui-select-choices>
					</ui-select>
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">是否需要密码</h4>
				<h4 class="col-sm-4">
					<select type="text" class="form-control" ng-model="card.is_need_password">
						<option value="0">不需要</option>
						<option value="1">需要</option>
					</select>
				</h4>
			</div>
			<div class="form-group" ng-show="card.is_need_password == '1'">
				<h4 class="col-lg-4 control-label">
					密码
				</h4>
				<h4 class="col-sm-4">
					<input type="password" class="form-control" placeholder="无需修改密码，请勿填写此项" ng-model="card.password">
				</h4>
				<label class="control-label text-muted mt10">
					<i>此项填写则修改，不填写则不修改</i>
				</label>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">状态</h4>
				<h4 class="col-sm-4">
					<select type="text" class="form-control" ng-model="card.status">
						<option value="0">初始状态</option>
						<option value="1">使用中</option>
					</select>
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">此卡应交押金（元）:</h4>
				<h4 class="col-sm-4">
					<input type="number" class="form-control" ng-model="card.deposit" min="0">
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">有效期开始：</h4>
				<h4 class="col-sm-4">
						<input type="text" 
							class="form-control" 
							datepicker-popup="yyyy-MM-dd" 
							ng-model="period_start.value" 
							is-open="period_start.opened" 
							ng-click="dateOpen($event, period_start)"
							placeholder="开始日期" 
							ng-required="true" 
							close-text="关闭" 
							current-text="今天" 
							clear-text="清除" 
							readonly/>
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">有效期结束：</h4>
				<h4 class="col-sm-4">
						<input type="text" 
							class="form-control" 
							datepicker-popup="yyyy-MM-dd" 
							ng-model="period_end.value" 
							is-open="period_end.opened" 
							ng-click="dateOpen($event, period_end)"
							placeholder="结束日期" 
							ng-required="true" 
							close-text="关闭" 
							current-text="今天" 
							clear-text="清除" 
							readonly/>
				</h4>
			</div>
		</div>
		<div ng-if="type != '1'">
			<div class="form-group">
				<h4 class="col-lg-4 control-label">卡面号:</h4>
				<h4 class="col-sm-4">
					<input type="text" class="form-control" ng-model="card.smart_card_no_new">
				</h4>
				<label class="control-label text-muted mt10">
					<i>原卡面号：{{card.smart_card_no}}</i>
				</label>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">卡内号:</h4>
				<h4 class="col-sm-4">
					<input type="text" class="form-control" ng-model="card.smart_card_new">
				</h4>
				<label class="control-label text-muted mt10">
					<i>原卡内号：{{card.smart_card}}</i>
				</label>
			</div>
		</div>
	</form>

</div>

<div class="modal-footer">
	<button class="btn btn-success" type="button" ng-click="ok()">确定</button>
	<button class="btn btn-danger" type="button" ng-click="close()">关闭</button>
</div>